package Utils;

/**
 * SQL语句常量类
 */
public class SQLSentencePoll {

    /**
     * 指定教师账户登录查询
     */
    public static final String Teacher_Login_Check =
            "select teacher_id as accountId,password,name from teacher_accounts " +
            "where teacher_id = ? and password = ?";

    /**
     * 指定学生账户登录查询
     */
    public static final String Student_Login_Check =
            "select student_id as accountId,password,name from student_accounts " +
            "where student_id = ? and password = ?";


    /**
     * 指定账户查询
     */
    public static final String SpecifiedAccount_Check =
            "select student_id as id from student_accounts where student_id = ?";


    /**
     *  新增一行账户信息
     */
    public static final String AccountInfo_Insertion =
            "insert into student_accounts values(?,?,?,?,?)";


    /**
     * 显示指定账户信息
     */
    public static final String SpecifiedAccountInfoDisplay =
            "select student_id as id,password,name,age,gender from student_accounts where student_id = ?";


    /**
     * 删除指定账户信息
     */
    public static final String SpecifiedAccountDeletion =
            "delete from student_accounts where student_id = ?";

    /**
     * 指定账户信息修改
     */
    public static final String SpecifiedAccountInfoUpdate =
            "update student_accounts " +
            "set student_id = ?,password = ?,name = ?,age = ?,gender = ? " +
            "where student_id = ?";

    /**
     * 查询所有账户信息
     */
    public static final String AllAccountsInfoDisplay =
            "select student_id as id,name,age,gender " +
            "from student_accounts";
}
